package Project;

public class Jv_4_8 {
	public static void main(String[] args) {
		  int[] ken = {10, 20, 30, 40, 50};
		  int i, ave, sum = 0;
		  System.out.println("***** result *****");
		  for(i=0; i<5; i++)
		      System.out.println("ken[" + i + "] = " + ken[i]);
		  for(i=0; i<5; i++)
		     sum += ken[i];
		  ave = sum/5;
		  System.out.println("sum =" + sum);
		  System.out.println("average = " + ave);
		  System.out.println("\n***** result *****");
		  int boo[] = new int[5];    
		  boo[0] = 10;
		  boo[1] = 20;
		  boo[2] = 30;
		  boo[3] = 40;
		  boo[4] = 50;
		  ave = 0;
		  sum = 0;  
		  for(i=0; i<5; i++)
		      System.out.println("boo[" + i + "] = " + boo[i]);
		  for(i=0; i<5; i++)
		     sum += boo[i];
		  ave = sum/5;
		  System.out.println("sum =" + sum);
		  System.out.println("average = " + ave);
	}
}
